package com.itcam.apis.wemedia;

import com.itcam.model.common.dtos.ResponseResult;
import com.itcam.model.wemedia.pojos.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient("leadnews-wemedia")
public interface IWemediaClient {


    /**
     * 查询自媒体账户
     * @param name
     * @return
     */
    @GetMapping("/api/v1/user/findByName/{name}")
    WmUser findWmUserByName(@PathVariable("name") String name);

    /**
     * 保存自媒体账户
     * @param wmUser
     */
    @PostMapping("/api/v1/wm_user/save")
    ResponseResult saveWmUser(WmUser wmUser);

    /**
     * 查询所有频道信息
     * @return
     */
    @GetMapping("/api/v1/channel/list")
    public ResponseResult getChannels();
}